﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace word.others
{
    public partial class MDIP : Form
    {
        public MDIP()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            this.IsMdiContainer = true;
            tabPage1.BackColor = Color.Red;
            MDIC form2 = new MDIC();
            form2.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
            form2.TopLevel = false;
            form2.Dock = DockStyle.Fill;
            tabPage2.Controls.Add(form2);
            form2.Show();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            Button button = new Button();
            MDIC form = new MDIC();
            form.MdiParent = this;
            form.Show();

        }
    }
}
